package com.github.soiff.shadow.loader;

import com.github.jknack.handlebars.io.AbstractTemplateLoader;
import com.github.jknack.handlebars.io.TemplateSource;
import com.github.soiff.shadow.common.ResourceFinder;

import java.io.IOException;
import java.util.Collection;

/**
 * Created by Soiff on 2016/05/23.
 *
 * @author : Soiff
 */
public class HandlebarsLoader extends AbstractTemplateLoader {
    @Override
    public TemplateSource sourceAt(String s) throws IOException {
        return new HandlebarsSource(finders, s);
    }

    private Collection<ResourceFinder> finders;
    public HandlebarsLoader(Collection<ResourceFinder> finders) {
        this.finders = finders;
    }
}
